//
//  MTDetailOrderController.m
//  ShiShiBang
//
//  Created by 宋宝强 on 16/9/26.
//  Copyright © 2016年 motianjituan. All rights reserved.
//

#import "MTDetailOrderController.h"
#import "MTDetailFirstCell.h"
#import "MTDetailMIddleCell.h"
#import "MTDetailThirdCell.h"

static NSString * const MTDetailFirstCellID = @"MTDetailFirstCell";
static NSString * const MTDetailMIddleCellID = @"MTDetailMIddleCell";
static NSString * const MTDetailThirdCellID = @"MTDetailThirdCell";

@interface MTDetailOrderController ()
@end

@implementation MTDetailOrderController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = themeGrayColor;
    [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([MTDetailFirstCell class]) bundle:nil] forCellReuseIdentifier:MTDetailFirstCellID];
     [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([MTDetailMIddleCell class]) bundle:nil] forCellReuseIdentifier:MTDetailMIddleCellID];
     [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([MTDetailThirdCell class]) bundle:nil] forCellReuseIdentifier:MTDetailThirdCellID];
}




#pragma mark ------ 数据源方法
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section  {
    return 3;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.row == 0) {
            MTDetailFirstCell *cell = [tableView dequeueReusableCellWithIdentifier:MTDetailFirstCellID];
        return cell;
    } else if (indexPath.row == 1 ) {
        // 设置数据
        MTDetailMIddleCell *cell = [tableView dequeueReusableCellWithIdentifier:MTDetailMIddleCellID];
        return cell;
    } else {
        // 设置数据
         MTDetailThirdCell *cell = [tableView dequeueReusableCellWithIdentifier:MTDetailThirdCellID];
        return cell;
    }


  
    
   
//    // 设置数据
//    MTRequireItem *item = self.itemArray[indexPath.row];
//    cell.item = item;
//    return cell;
//    XMGCarGroup *group = self.carGroups[indexPath.section];
//    XMGCar *car = group.cars[indexPath.row];
//    
//    cell.imageView.image = [UIImage imageNamed:car.icon];
//    cell.textLabel.text = car.name;
//    return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
}



@end
